/*
   POSPrinterConst.h
   
   Copyright (C) 2006 LinuxOne, Inc. <Republic of korea>

   This library is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation; either version 2.1
   of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lessor General Public License for more details.

   You should have received a copy of the GNU Lessor General Public
   License along with this library; if not, write to the Free Software
   Foundation, inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

   Hyunjin Kim <mgc521@linuxone.co.kr>

   LinuxOne, Inc., hereby disclaims all copylight
   written by Hyunjin Kim, 28 December 2006
*/

#ifndef _BOOYO_POS_POSPRINTER_CONST_H_
#define _BOOYO_POS_POSPRINTER_CONST_H_

namespace booyopos
{

class CPOSPrinterConst : public CBooyoPOSConst
{
public:
	enum PrinterStation
	{
		PTR_S_JOURNAL	= 1,
		PTR_S_RECEIPT	= 2,
		PTR_S_SLIP		= 4,
		
		PTR_S_JOURNAL_RECEIPT	= PTR_S_JOURNAL | PTR_S_RECEIPT,
		PTR_S_JOURNAL_SLIP		= PTR_S_JOURNAL | PTR_S_SLIP,
		PTR_S_RECEIPT_SLIP		= PTR_S_RECEIPT | PTR_S_SLIP,

		PTR_TWO_RECEIPT_JOURNAL	= 0x8000 + PTR_S_JOURNAL_RECEIPT,
		PTR_TWO_SLIP_JOURNAL	= 0x8000 + PTR_S_JOURNAL_SLIP,
		PTR_TWO_SLIP_RECEIPT	= 0x8000 + PTR_S_RECEIPT_SLIP
	};

	enum CapCharacterSet
	{
		PTR_CCS_ALPHA		= 1,
		PTR_CCS_ASCII		= 998,
		PTR_CCS_KANA		= 10,
		PTR_CCS_KANJI		= 11,
		PTR_CCS_UNICODE		= 997
	};

	enum CharacterSet
	{
		PTR_CS_UNICODE		= 997,
		PTR_CS_ASCII		= 998,
		PTR_CS_ANSI			= 999
	};

	enum ErrorLevel
	{
		PTR_EL_NONE			= 1,
		PTR_EL_RECOVERABLE	= 2,
		PTR_EL_FATAL		= 3
	};

	enum MapMode
	{
		PTR_MM_DOTS			= 1,
		PTR_MM_TWIPS		= 2,
		PTR_MM_ENGLISH		= 3,
		PTR_MM_METRIC		= 4
	};

	enum CapXxxColor
	{
		PTR_COLOR_PRIMARY	= 0x00000001,
		PTR_COLOR_CUSTOM1	= 0x00000002,
		PTR_COLOR_CUSTOM2	= 0x00000004,
		PTR_COLOR_CUSTOM3	= 0x00000008,
		PTR_COLOR_CUSTOM4	= 0x00000010,
		PTR_COLOR_CUSTOM5	= 0x00000020,
		PTR_COLOR_CUSTOM6	= 0x00000040,
		PTR_COLOR_CYAN		= 0x00000100,
		PTR_COLOR_MAGENTA	= 0x00000200,
		PTR_COLOR_YELLOW	= 0x00000400,
		PTR_COLOR_FULL		= 0x80000000
	};

	enum CapXxxCartridgeSensor
	{
		PTR_CART_UNKNOWN	= 0x10000000,
		PTR_CART_OK			= 0x00000000,
		PTR_CART_REMOVED	= 0x00000001,
		PTR_CART_EMPTY		= 0x00000002,
		PTR_CART_NEAREND	= 0x00000004,
		PTR_CART_CLEANING	= 0x00000008
	};

	enum CartridgeNotify
	{
		PTR_CN_DISABLED		= 0x00000000,
		PTR_CN_ENABLED		= 0x00000001
	};

	enum PageModeDescriptor
	{
		PTR_PM_BITMAP		= 0x00000001,
		PTR_PM_BARCODE		= 0x00000002,
		PTR_PM_BM_ROTATE	= 0x00000004,
		PTR_PM_BC_ROTATE	= 0x00000008,
		PTR_PM_OPAQUE		= 0x00000010
	};

	enum PageModePrintDirection
	{
		PTR_PD_LEFT_TO_RIGHT	= 1,
		PTR_PD_BOTTOM_TO_TOP	= 2,
		PTR_PD_RIGHT_TO_LEFT	= 3,
		PTR_PD_TOP_TO_BOTTOM	= 4
	};

	enum ClearPrintArea
	{
		PTR_PM_PAGE_MODE	= 1,
		PTR_PM_PRINT_SAVE	= 2,
		PTR_PM_NORMAL		= 3,
		PTR_PM_CANCEL		= 4
	};

	/* "CutPaper" Method Constant */
	enum CutPaper
	{
		PTR_CP_FULLCUT		= 100
	};

	/* "PrintBarCode" Method Constants */
	enum PrintBarCode
	{
		// Alignment
		PTR_BC_LEFT			= -1,
		PTR_BC_CENTER		= -2,
		PTR_BC_RIGHT		= -3,

		// TextPosition
		PTR_BC_TEXT_NONE	= -11,
		PTR_BC_TEXT_ABOVE	= -12,
		PTR_BC_TEXT_BELOW	= -13,

		// symbology
		PTR_BCS_UPCA		= 101,
		PTR_BCS_UPCE		= 102,
		PTR_BCS_JAN8		= 103,
		PTR_BCS_EAN8		= 103,
		PTR_BCS_JAN13		= 104,
		PTR_BCS_EAN13		= 104,
		PTR_BCS_TF			= 105,
		PTR_BCS_ITF			= 106,
		PTR_BCS_Codabar		= 107,
		PTR_BCS_Code39		= 108,
		PTR_BCS_Code93		= 109,
		PTR_BCS_Code128		= 110,
		PTR_BCS_UPCA_S		= 111,
		PTR_BCS_UPCE_S		= 112,
		PTR_BCS_UPCD1		= 113,
		PTR_BCS_UPCD2		= 114,
		PTR_BCS_UPCD3		= 115,
		PTR_BCS_UPCD4		= 116,
		PTR_BCS_UPCD5		= 117,
		PTR_BCS_EAN8_S		= 118,
		PTR_BCS_EAN13_S		= 119,
		PTR_BCS_EAN128		= 120,
		PTR_BCS_OCRA		= 121,
		PTR_BCS_OCRB		= 122,
		PTR_BCS_Code128_parsed	= 123,
		PTR_BCS_RSS14		= 131,
		PTR_BCS_RSS_EXPANDED	= 132,

		// Two dimensional symbologies
		PTR_BCS_PDF417		= 201,
		PTR_BCS_MAXICODE	= 202,

		PTR_BCS_OTHER		= 501
	};

	/* "PrintBitmap" and "PrintMemoryBitmap" Method Constants */
	enum PrintBitmap
	{
		// width
		PTR_BM_ASIS			= -11,

		// alignment
		PTR_BM_LEFT			= -1,
		PTR_BM_CENTER		= -2,
		PTR_BM_RIGHT		= -3,

		// type
		PTR_BMT_BMP			= 1,
		PTR_BMT_JPEG		= 2,
		PTR_BMT_GIF			= 3
	};

	/* "RotatePrint" Method: "rotation" Parameter Constants */
	enum RotatePrint
	{
		PTR_RP_NORMAL		= 0x0001,
		PTR_RP_RIGHT90		= 0x0101,
		PTR_RP_LEFT90		= 0x0102,
		PTR_RP_ROTATE180	= 0x0103,
	};

	enum RotateSpecial
	{
		PTR_RP_BARCODE		= 0x1000,
		PTR_RP_BITMAP		= 0x2000
	};

	/* "SetLogo" Method : "location" Parameter Constants */
	enum SetLogo
	{
		PTR_L_TOP			= 1,
		PTR_L_BOTTOM		= 2
	};

	/* "TransactionPrint" Method : "control" Parameter Constants */
	enum TransactionPrint
	{
		PTR_TP_TRANSACTION	= 11,
		PTR_TP_NORMAL		= 12
	};

	/* "MarkFeed" Method " "type" Parameter Constants */
	enum MarkFeed
	{
		PTR_MF_TO_TAKUP			= 1,
		PTR_MF_TO_CUTTER		= 2,
		PTR_MF_TO_CURRENT_TOF	= 4,
		PTR_MF_TO_NEXT_TOF		= 8
	};

	/* "ChangePrintSide" Method : "side" Parameter Constants */
	enum ChangePrintSide
	{
		PTR_PS_UNKNOWN		= 0,
		PTR_PS_SIDE1		= 1,
		PTR_PS_SIDE2		= 2,
		PTR_PS_OPPOSITE		= 3
	};

	/* "StatusUpdateEvent" Event : "status" Parameter Constants */
	enum StatusUpdateEvent
	{
		PTR_SUE_COVER_OPEN		= 11,
		PTR_SUE_COVER_OK		= 12,

		PTR_SUE_JRN_EMPTY		= 21,
		PTR_SUE_JRN_NEAREMPTY	= 22,
		PTR_SUE_JRN_PAPEROK		= 23,

		PTR_SUE_REC_EMPTY		= 24,
		PTR_SUE_REC_NEAREMPTY	= 25,
		PTR_SUE_REC_PAPEROK		= 26,
		
		PTR_SUE_SLP_EMPTY		= 27,
		PTR_SUE_SLP_NEAREMPTY	= 28,
		PTR_SUE_SLP_PAPEROK		= 29,

		PTR_SUE_JRN_CARTRIDGE_EMPTY		= 41,
		PTR_SUE_JRN_CARTRIDGE_NEAREMPTY	= 42,
		PTR_SUE_JRN_HEAD_CLEANING		= 43,
		PTR_SUE_JRN_CARTDRIGE_OK		= 44,
		PTR_SUE_JRN_CARTRIDGE_OK		= 44,

		PTR_SUE_REC_CARTRIDGE_EMPTY		= 45,
		PTR_SUE_REC_CARTRIDGE_NEAREMPTY	= 46,
		PTR_SUE_REC_HEAD_CLEANING		= 47,
		PTR_SUE_REC_CARTDRIGE_OK		= 48,
		PTR_SUE_REC_CARTRIDGE_OK		= 48,

		PTR_SUE_SLP_CARTRIDGE_EMPTY		= 49,
		PTR_SUE_SLP_CARTRIDGE_NEAREMPTY	= 50,
		PTR_SUE_SLP_HEAD_CLEANING		= 51,
		PTR_SUE_SLP_CARTDRIGE_OK		= 52,
		PTR_SUE_SLP_CARTRIDGE_OK		= 52,

		PTR_SUE_IDLE		= 1001,

		PTR_SUE_JRN_COVER_OPEN	= 60,
		PTR_SUE_JRN_COVER_OK	= 61,
		PTR_SUE_REC_COVER_OPEN 	= 62,
		PTR_SUE_REC_COVER_OK	= 63,
		PTR_SUE_SLP_COVER_OPEN	= 64,
		PTR_SUE_SLP_COVER_OK	= 65
	};

	enum ResultCodeExtended
	{
		EPTR_COVER_OPEN		= 1 + ERREXT,
		EPTR_JRN_EMPTY		= 2 + ERREXT,
		EPTR_REC_EMPTY		= 3 + ERREXT,
		EPTR_SLP_EMPTY		= 4 + ERREXT,
		EPTR_SLP_FORM		= 5 + ERREXT,
		EPTR_TOOBIG			= 6 + ERREXT,
		EPTR_BADFORMAT		= 7 + ERREXT,
		EPTR_JRN_CARTRIDGE_REMOVED	= 8 + ERREXT,
		EPTR_JRN_CARTRIDGE_EMPTY	= 9 + ERREXT,
		EPTR_JRN_HEAD_CLEANING		= 10 + ERREXT,
		EPTR_REC_CARTRIDGE_REMOVED	= 11 + ERREXT,
		EPTR_REC_CARTRIDGE_EMPTY	= 12 + ERREXT,
		EPTR_REC_HEAD_CLEANING		= 13 + ERREXT,
		EPTR_SLP_CARTRIDGE_REMOVED	= 14 + ERREXT,
		EPTR_SLP_CARTRIDGE_EMPTY	= 15 + ERREXT,
		EPTR_SLP_HEAD_CLEANING		= 16 + ERREXT
	};

	/* Capabilities */
	int capCharacterSet;
	bool capConcurrentJrnRec;
	bool capConcurrentJrnSlp;
	bool capConcurrentRecSlp;
	bool capCoverSensor;
	bool capConcurrentPageMode;
	bool capTransaction;
	bool capJrn2Color;
	bool capJrnBold;
	bool capJrnDhigh;
	bool capJrnDwide;
	bool capJrnDwideDhigh;
	bool capJrnEmptySensor;
	bool capJrnItalic;
	bool capJrnNearEndSensor;
	bool capJrnPresent;
	bool capJrnUnderline;
	bool capRec2Color;
	bool capRecBarCode;
	bool capRecBitmap;
	bool capRecBold;
	bool capRecDhigh;
	bool capRecDwide;
	bool capRecDwideDhigh;
	bool capRecEmptySensor;
	bool capRecItalic;
	bool capRecLeft90;
	bool capRecNearEndSensor;
	bool capRecPapercut;
	bool capRecPresent;
	bool capRecRight90;
	bool capRecRotate180;
	bool capRecStamp;
	bool capRecUnderline;
	bool capSlp2Color;
	bool capSlpBarCode;
	bool capSlpBitmap;
	bool capSlpBold;
	bool capSlpDhigh;
	bool capSlpDwide;
	bool capSlpDwideDhigh;
	bool capSlpEmptySensor;
	bool capSlpFullslip;
	bool capSlpItalic;
	bool capSlpLeft90;
	bool capSlpNearEndSensor;
	bool capSlpPresent;
	bool capSlpRight90;
	bool capSlpRotate180;
	bool capSlpUnderline;
	int capPowerReporting;
	int capJrnCartridgeSensor;
	int capJrnColor;
	int capRecCartridgeSensor;
	int capRecColor;
	int capRecMarkFeed;
	bool capSlpBothSidesPrint;
	int capSlpCartridgeSensor;
	int capSlpColor;
	bool capMapCharacterSet;
	bool capStatisticsReporting;
	bool capUpdateStatistics;
	bool capCompareFirmwareVersion;
	bool capSlpPageMode;
	bool capRecPageMode;
	bool capUpdateFirmware;

	/* Properties */
	bool asyncMode;
	int characterSet;
	std::string characterSetList;
	bool coverOpen;
	int errorStation;
	int errorLevel;
	std::string errorString;
	bool flagWhenIdle;
	std::string fontTypefaceList;
	bool jrnEmpty;
	bool jrnLetterQuality;
	int jrnLineChars;
	std::string jrnLineCharsList;
	int jrnLineHeight;
	int jrnLineSpacing;
	int jrnLineWidth;
	bool jrnNearEnd;
	int mapMode;
	std::string recBarCodeRotationList;
	bool recEmpty;
	bool recLetterQuality;
	int recLineChars;
	std::string recLineCharsList;
	int recLineHeight;
	int recLineSpacing;
	int recLinesToPaperCut;
	int recLineWidth;
	bool recNearEnd;
	int recSidewaysMaxChars;
	int recSidewaysMaxLines;
	int rotateSpecial;
	std::string slpBarCodeRotationList;
	bool slpEmpty;
	bool slpLetterQuality;
	int slpLineChars;
	std::string slpLineCharsList;
	int slpLineHeight;
	int slpLinesNearEndToEnd;
	int slpLineSpacing;
	int slpLineWidth;
	int slpMaxLines;
	bool slpNearEnd;
	int slpSidewaysMaxChars;
	int slpSidewaysMaxLines;
	int powerNotify;
	int powerState;
	int cartridgeNotify;
	int jrnCartridgeState;
	int jrnCurrentCartridge;
	int recCartridgeState;
	int recCurrentCartridge;
	int slpCartridgeState;
	int slpCurrentCartridge;
	int slpPrintSide;
	bool mapCharacterSet;
	std::string recBitmapRotationList;
	std::string slpBitmapRotationList;
	std::string pageModeArea;
	int pageModeDescriptor;
	int pageModeHorizontalPosition;
	std::string pageModePrintArea;
	int pageModePrintDirection;
	int pageModeStation;
	int pageModeVerticalPosition;
};

} // namespace booyopos

#endif // _BOOYO_POS_POSPRINTER_CONST_H_
